home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 3.9 KB | 89 lines | [TEXT/GEOL] |
- Item 6683697 19-Dec-90 17:05PST
-
- From: MADA.SYSOP MacApp Dev Assoc, Don Sawtelle,IVC
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: re: Performance HELP!
-
- [From TerranVW on America Online at 90-12-18 18:38:05 EST]
-
- Michael, this is probably the memory manager bug in the new ROMs
- there's been quite a bit of traffic on A'link about this. quoting
- from one link titled "Slow IIci Memeory Mgr'
-
- Dick Startz (TSP.STARTZ) responds:
- ---
- I've had exactly the same situation with the IIci using NewPtr rather than
- handles. I've documented it and asked DTS for advice.
- ---
-
- Well, I think that this one has finally been nailed down. When dealing with
- Memory Management on the Macintosh, there is a lot of problem dealing with
- cause and effect. With as many changes as there were in the ROMs on the IIci
- (and IIfx, IIsi, and LC), it's not easy to determine if the problem is with the
- Memory Manager or elsewhere (for instance, with some toolbox routine
- fragmenting the heap).
-
- After Dick sent in his request to DTS, I spent a few late hours at work trying
- to track it down. By carefully controlling the environment the application ran
- under, it became apparent that the problem was definitely a bug in the Memory
- Manager on those four machines. Those ROMs are referred to as the "32-bit
- clean" ROMs, and are identified with the ROM version $67C. (Dick, by now, you
- should have your response from DTS describing the problem in detail).
-
- The fix for this is not going to be simple. The bug is at the very core of the
- Memory Manager. Because the Memory Manager is not vectored aside from its entry
- points, and because it is self contained, there are no places for a patch to be
- hooked in. It is possible that if a fix is put in place, it will have to be
- done by replacing the entire Memory Manager (about 9K).
-
- Characteristics of the problem:
- -------------------------------
- In many of the Memory Manager's operations, it needs to find blocks of free
- space. Rather than perform an exhaustive search on the entire heap every time,
- the Memory Manager maintains a hint that it stores in the zone header
- (AllocPtr). When looking for free space, the Memory Manager starts at the block
- pointed to by AllocPtr, proceeding to the end of the heap. If it doesn't find a
- block of free space large enough, it starts over from the beginning of the
- heap.
-
- The problem is that AllocPtr sometimes gets set with Master Pointer bits in the
- high byte. When the comparison is made to see if the pointer is past the end of
- the heap, the result always indicates that we HAVE past the end of the heap,
- and the search is restarted from the beginning. Hence, we get a performance
- degradation.
-
- You may be able to structure your program to avoid this problem as much as
- possible. If you can arrange your heap such that relatively few objects are
- locked low in memory, or if you can limit your use of non-relocatable blocks
- (which are placed low in memory), you can limit the effects of the bug. By
- reducing the number of blocks low in the heap, you reduce the speed impact
- caused by starting a free block search at the beginning of the heap.
-
- On the other hand, this approach is realistically impractical... Perhaps a
- solution involving sub-zones in your heap would be easier to implement...
-
- - Keith Rollin
- - Apple Developer Technical Support
-
- DSBB: Devs Ask Each Other: General Discussion
- 11-12-90
-
- This is Terran again: another recent link:
-
- Keith "ALINK MOOF" Rollin of MacDTS has made some fantastic progress on a patch
- to the memory manager (both 24-bit and 32-bit) on the IIci,fx,lc,&si. Ask him
- for a trial copy of his memory manager init and I bet your problem gets fixed.
-
- -Dick Startz
- TSP.STARTZ
- Developers Ask Each Other: General
- 11/20/90
-
- So Maybe Keith has finished the patch, in it anywhere on AOL?
- Terran, AOL: TerranVW
-
-